import json

with open('whispers.min.json') as f:
    toots = json.load(f)

num_files = len(toots) // 200 + 1  
# 循环分割数组并保存到文件中  
for i in range(num_files):  
    start_index = i * 200  
    end_index = (i + 1) * 200 if i < num_files - 1 else len(toots)  
    chunk = toots[start_index:end_index]  
    with open(f"whispers{i+1}.min.json", "w") as f:  
        json.dump(chunk, f,ensure_ascii=False)

print("切分完成 , 一共",num_files,"个文件")